const App = {
    mixins: [Save],//配置文件，路径/utils/mixins.js
    data() {
        return {
            Manager: [],
            activityType: [],
            Recorder: [],
            dataForm: { Activity_Points: 1 },
            childDataForm1: [{}],
            childDataForm: [],
            members:[],//报名人员
            fileList: [],

        };
    },
    mounted() {
        this.getCategory();
    },
    methods: {
        getCategory() {
            $.ajax({
                headers: requestHeaders(),
                url: `${mh}/clientOperation/getDistrictTree`,
                type: "GET",
                data: {
                    DistrictCode: '232723'
                },
                success: (data) => {
                    this.Manager = data; // 直接使用 this
                },
                complete: (XMLHttpRequest) => {
                    requestPretreatment(XMLHttpRequest);
                },
                dataType: "json",
            });
            $.ajax({
                headers: requestHeaders(),
                url: `${mh}/generalBusiness/generalQueryByTableName`,
                method: "post",
                data: {
                    Data: "personal_information", //表名
                    Condition: "Row_Status='0'",
                },
                success: (res) => {
                    this.Recorder = res;
                },
                complete: (XMLHttpRequest) => {
                    requestPretreatment(XMLHttpRequest);
                },
            });
            $.ajax({
                headers: requestHeaders(),
                url: `${mh}/generalBusiness/generalQueryByTableName`,
                method: "post",
                data: {
                    Data: "village_activities_type", //表名
                    Condition: "Row_Status='0' AND Is_Assembly='0'",
                },
                success: (res) => {
                    this.activityType = res;
                },
                complete: (XMLHttpRequest) => {
                    requestPretreatment(XMLHttpRequest);
                },
            });
        },
        async handleChange({ raw }, type) {
            const result = await uploadBinaryFile(raw);
            if (result.status == 'success') {

                this.party_organization_activities_summary.push({
                    Party_Organization_Activity_SerialNumber: this.dataForm.Party_Organization_Activity_SerialNumber,
                    Activity_Summary_URL: result.fileName,
                    Activity_Summary_Type: type,
                    uid: raw.uid,
                })
            }
        },
    },

};
const { createApp, ref } = Vue;
const app = createApp(App);
app.use(ElementPlus, { locale: zhCn });
//这种方式是引入全部图标，无需单个引入
app.component('yl-cascader', ylCascader)
for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
    app.component(key, component);
}
app.component('yl-upload', ylUpload);
app.component('yl-select', ylSelect);
const ElMessage = ElementPlus.ElMessage;
app.mount("#app");
